<include file="public:header" />
<br>
<style>
    select{width:90px;}
</style>
<!--会员列表-->
<div class="pad_lr_10">
    <form name="searchform" method="get" >
    <table width="100%" cellspacing="0" class="search_form">
        <tbody>
            <tr>
                <td>
                <div class="explain_col">
                    <input type="hidden" name="g" value="admin" />
                    <input type="hidden" name="m" value="item_del" />
                    <input type="hidden" name="a" value="index" />
                    <input type="hidden" name="menuid" value="{$menuid}" />
                   	商品分类：
              		<select class="J_cate_select mr10" data-pid="0" data-uri="{:U('item_cate/ajax_getchild', array('type'=>0))}" data-selected="{$search.selected_ids}"></select>
                    <input type="hidden" name="cate_id" id="J_cate_id" value="{$search.cate_id}"/>
                    &nbsp;&nbsp;审核状态：
                    <select name="status">
                        <option value="">-{:L('all')}-</option>
                        <option value="0" <if condition="$search.status eq '0'">selected="selected"</if>>未审核</option>
                        <option value="1" <if condition="$search.status eq '1'">selected="selected"</if>>已审核</option>
                    </select>
					&nbsp;&nbsp;上架状态：
                    <select name="is_check">
                        <option value="">-{:L('all')}-</option>
                        <option value="0" <if condition="$search.is_check eq '0'">selected="selected"</if>>下架</option>
                        <option value="1" <if condition="$search.is_check eq '1'">selected="selected"</if>>上架</option>
                    </select>
                    
                    添加时间：
                    <input type="text" name="stime" id="J_time_start" class="date J_date_picker" size="18" value="{$search.stime}">
                    -
                    <input type="text" name="etime" id="J_time_end" class="date J_date_picker" size="18" value="{$search.etime}">
					<div style="height:8px"></div>
					
                    &nbsp;&nbsp;商品品牌：
                    <select name="brand_id">
                        <option value="">请选择</option>
                        <volist name="brand_list" id="val">
                            <option value="{$val['id']}" <if condition="$search['brand_id'] eq $val['id']">selected="selected</if>>{$val.title}</option>
                        </volist>
                    </select>
                    &nbsp;&nbsp;商品名称：      
                    <input name="title" type="text" class="input-text" size="15" value="{$search.title}" />
                    &nbsp;&nbsp;商品id：
                    <input name="id" type="text" class="input-text" size="18" value="{$search.id}" />
                   	&nbsp;&nbsp;关键字：
                    <input name="keyword" type="text" class="input-text mr10" size="18" value="{$search.keyword}" />
                    <input type="submit" name="search" class="btn mr10" value="搜索" />
                </div>
                </td>
            </tr>
        </tbody>
    </table>
    </form>

    <div class="J_tablelist table_list" data-acturi="{:U('item/ajax_edit')}">
    <table width="100%" cellspacing="0">
        <thead>
            <tr>
                <th width=25><input type="checkbox" id="checkall_t" class="J_checkall"></th>
                <th width="50" align="left"><span data-tdtype="order_by" data-field="id">商品ID</span></th>
                <th width="40">图片</th>
                <th width="80">分类</th>
                <th align="left"><span data-tdtype="order_by" data-field="title">商品名称</span></th>
                <th width="60"><span data-tdtype="order_by" data-field="sales">销量</span></th>
                <th width="60"><span data-tdtype="order_by" data-field="price">东仁价</span></th>
                <th width="60"><span data-tdtype="order_by" data-field="mprice">市场价</span></th>
                <th width="60"><span data-tdtype="order_by" data-field="app_price">App价格</span></th>
                <th width="80"><span data-tdtype="order_by" data-field="stock">库存</span></th>
                <th width="50"><span data-tdtype="order_by" data-field="ordid">排序</span></th> 
				<th width="40"><span data-tdtype="order_by" data-field="status">状态</span></th>
                <th width="120">{:L('operations_manage')}</th>
            </tr>
        </thead>
    	<tbody>
            <volist name="list" id="val" >
            <tr>
                <td align="center"><input type="checkbox" class="J_checkitem" value="{$val.id}"></td>
                <td>{$val.id}</td>
                <td align="center">
                    <if condition="$val['img']">
                        <span class="attachment_icon J_attachment_icon" file-type="image" file-rel="{:attach($val['img'], 'assets')}"><img src="{:attach($val['img'], 'assets')}" width="30" /></span>
                    </if>
                </td>
                <td align="center">{$cate_list[$val['cate_id']]}</td>
               	<td>
                    {:msubstr($val[title],30)}
                </td>
                <td align="center">{$val['sales']}</td>
                <td align="center">
                    ￥{$val['price']}
                </td>
                <td align="center">
                    ￥{$val['mprice']}
                </td>
                <td align="center">
                   ￥{$val['app_price']}
                </td>
                <td align="center" >
                    {$val.stock}
                </td>
                <td align="center">{$val.ordid}</td>
				<td align="center">
                    <if condition="$val.status eq 0"><span style="color:blue">未审核</span>
                    <elseif condition="$val.status eq 1" /><span style="color:green">已审核</span>
                    <elseif condition="$val.status eq 2" /><span style="color:red">未通过</span></if>
					<br>
					<if condition="$val[is_check] eq 1"><span style="color:green">上架</span><else/><span style="color:red">下架</span></if>
                </td>
               	<td align="center">
				<a href="javascript:void(0);" class="J_confirmurl" data-uri="{:u('item_del/back', array('id'=>$val['id']))}" data-acttype="ajax" data-msg="确定还原?">还原</a><!--  | <a href="javascript:void(0);" class="J_confirmurl" data-uri="{:u('item_del/delete', array('id'=>$val['id']))}" data-acttype="ajax" data-msg="{:sprintf(L('confirm_delete_one'),$val['title'])}">移除</a> -->
				</td>
            </tr>
            </volist>
    	</tbody>
    </table>
    <div class="btn_wrap_fixed">
        <label class="select_all"><input type="checkbox" name="checkall" class="J_checkall">{:L('select_all')}/{:L('cancel')}</label>
        <!-- <input type="button" class="btn" data-tdtype="batch_action" data-acttype="ajax" data-uri="{:U('item_del/delete',array('id'=>$r['id']))}" data-name="id" data-msg="{:L('confirm_delete')}" value="移除" /> -->
        <input type="button" class="btn" data-tdtype="batch_action" data-acttype="ajax" data-uri="{:U('item_del/back',array('id'=>$r['id']))}" data-name="id" data-msg="确定还原?" value="还原" />
        <div id="pages">{$page}</div>
    </div>

    </div>
</div>
<include file="public:footer" />
<script src="__STATIC__/js/PCASClass.js"></script>
<script>
$(function(){
	$('.J_cate_select').cate_select({field:'J_cate_id'});
	$('.J_cate_select2').cate_select({field:'J_cate_id2'});
});
</script>
